﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPage_Admin.master" AutoEventWireup="true"
    CodeFile="news_manage.aspx.cs" Inherits="admin_news_manage" Title="IT110：不良信息举报与检索平台 - 资讯信息管理 - By ECountry.Ltd" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_Search" runat="Server">
    <div class="w-sjzzbb">
        <div class="w-sjzztop">
			广告管理中心
		</div>
    </div>
    <div style="text-align: left">
        <div id="Div1" runat="server" style="border-right: #ccc 1px solid; padding-right: 5px;
            border-top: #ccc 1px solid; padding-left: 5px; z-index: 101; left: 246px; padding-bottom: 5px;
            border-left: #ccc 1px solid; width: 286px; padding-top: 5px; border-bottom: #ccc 1px solid;
            position: absolute; top: 104px; height: 162px; background-color: white; text-align: left">
            
            <strong>ECountry Cms分类统计:</strong><br />
            <br />
            新闻阅读总数:
            <asp:Label ID="Label2" runat="server" ForeColor="Red" Font-Bold="True"></asp:Label><br />
            <br />
            该分类阅读数:
            <asp:Label ID="Label3" runat="server" ForeColor="Red" Font-Bold="True"></asp:Label><br />
            <br />
            该分类百分比:
            <asp:Label ID="Label4" runat="server" ForeColor="Red" Font-Bold="True"></asp:Label><br />
            <br />
            &nbsp;<asp:Button ID="Button4" runat="server" BorderStyle="Solid" OnClick="Button4_Click"
                Style="border-right: #4a95c9 1px solid; border-top: #4a95c9 1px solid; border-left: #4a95c9 1px solid;
                border-bottom: #4a95c9 1px solid; background-color: #b7d8ed" Text="关闭" />
            <span style="color: gray">该统计根据新闻阅读次数来统计</span>
        </div>
        <table style="width: 100%">
            <tr>
                <td style="width: 100%">
                    <img src="image/newsitem_icon.gif" alt="发布新闻" />
                    <a href="news_add.aspx">添加新闻</a>
                    <!--                        <img alt="发布新闻" src="images/newsitem_icon.gif" />
                        <a href="check_user_news.aspx">查看最新投稿</a>&nbsp;
                        <img alt="" src="images/access_(add)_16x16.gif" /> <a href="caiji_manage.aspx">
                        采集新闻</a>
                        <img src="images/award_star_gold_1.png" />搜索:
                        <asp:TextBox ID="TextBox1" runat="server" Style="font-size: 12px"></asp:TextBox>
                        &nbsp;<asp:Button style="border:#4a95c9 1px solid; background-color: #b7d8ed"  
                            ID="Button1" runat="server" Text="搜索新闻" OnClick="Button1_Click" Width="68px"  />
                        &nbsp;<asp:Button style="border:#4a95c9 1px solid; background-color: #b7d8ed"  
                                ID="Button2" runat="server" Text="高级搜索" OnClick="Button2_Click" Width="67px"  /> <asp:Button style="border:#4a95c9 1px solid; background-color: #b7d8ed"   ID="Button3" runat="server" Text="按编号搜索" OnClick="Button3_Click" Width="80px"  />
                        &nbsp;&nbsp;
                        <asp:Label ID="Label1" runat="server" ForeColor="#FF3300" Text="" Width="198px"></asp:Label>
-->
                </td>
            </tr>
            <tr>
                <td style="border-right: #ead9b9 1px solid; border-top: #ead9b9 1px solid; border-left: #ead9b9 1px solid;
                    width: 100%; border-bottom: #ead9b9 1px solid; background-color: #fffdee; font-size: 12px;
                    color: #c18945;">
                    ECountry NT提示:<br />
                    选择上面“添加新闻”可转到添加新闻页面；点击每条新闻“修改”链接可转到新闻修改页面.<br />
                    选择下面的“新闻子类”,即可查看相关分类下的新闻,你可以点击<strong>分类编号</strong>,或者<strong>新闻标题</strong>来排序控件.<br />
                </td>
            </tr>
            <tr>
                <td style="width: 100%">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            &nbsp; 新闻类别<%--&nbsp; &gt;&gt;&nbsp; 
                        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                            DataSourceID="ObjectDataSourceNewsMainClassSelect" DataTextField="title" 
                            DataValueField="id" Enabled="False">
                            <asp:ListItem Value="0" Selected="True">所有新闻大类</asp:ListItem>
                            <asp:ListItem>eg2</asp:ListItem>
                        </asp:DropDownList>   --%>&nbsp;&nbsp; &gt;&gt;&nbsp;
                            <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSourceNewsSubClass"
                                DataTextField="title" DataValueField="id" AppendDataBoundItems="True">
                                <asp:ListItem Value="-1">==所有资讯子类==</asp:ListItem>
                            </asp:DropDownList>
                            <%--<asp:ObjectDataSource ID="ObjectDataSourceNewsMainClassSelect" runat="server" 
                            OldValuesParameterFormatString="original_{0}" 
                            SelectMethod="Get_Data_Order_By_SubSort" 
                            
                            
                            TypeName="DataSet_fp_news_DyhTableAdapters.Dyh_News_TypeTableAdapter">
                        </asp:ObjectDataSource>--%>
                            <asp:ObjectDataSource ID="ObjectDataSourceNewsSubClass" runat="server" OldValuesParameterFormatString="original_{0}"
                                SelectMethod="Get_Data_Order_By_SubSort" TypeName="DataSet_fp_news_DyhTableAdapters.Dyh_News_TypeTableAdapter">
                            </asp:ObjectDataSource>
                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                DataSourceID="ObjectDataSource_News_Manage" Width="100%" Style="font-size: 12px;
                                text-align: center;" AlternatingRowStyle-BackColor="#f5f5f5"  BorderColor="#ffffff"
                                OnRowDataBound="GridView1_RowDataBound" DataKeyNames="id" AllowSorting="True" 
                                PageSize="16">
                                <PagerSettings PageButtonCount="13" />
                                <HeaderStyle BackColor="#0099ff" ForeColor="White" Height="40" Font-Size="15px" HorizontalAlign="Center" VerticalAlign="Middle"/>
                                <RowStyle BackColor="#c7e9ff" ForeColor="#333333" Height="40"/>
                                <Columns>
                                    <asp:BoundField DataField="id" HeaderText="ID" SortExpression="id" ReadOnly="True"
                                        InsertVisible="False">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="title" HeaderText="新闻标题" SortExpression="title">
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="subclasstitle" HeaderText="新闻子类" SortExpression="subclasstitle">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" Width="75px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="hits" HeaderText="人气" SortExpression="hits">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle Width="40px" HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="username" HeaderText="修改用户" SortExpression="truename">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle Width="70px" HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="time" HeaderText="修改时间" SortExpression="time" DataFormatString="{0:d}">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" Width="125px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="readstate" HeaderText="状态" SortExpression="readstate">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" Width="75px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Delete_flag" HeaderText="启用" SortExpression="Delete_flag">
                                    </asp:BoundField>
                                    <asp:HyperLinkField DataNavigateUrlFields="id,subclassid" DataNavigateUrlFormatString="news_modi.aspx?newsid={0}&amp;subclassid={1}"
                                        HeaderText="编辑" Text="修改">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle Width="50px" HorizontalAlign="Center" ForeColor="Blue" />
                                    </asp:HyperLinkField>
                                    <asp:CommandField ShowDeleteButton="True" HeaderText="删除">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle Width="50px" HorizontalAlign="Center" />
                                    </asp:CommandField>
                                    <asp:BoundField DataField="isshow" HeaderText="禁用" SortExpression="isshow" Visible="False">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                                    </asp:BoundField>
                                </Columns>
                                <AlternatingRowStyle BackColor="White" />
                                <PagerTemplate>
                                    <table width="100%">
                                        <tr>
                                            <td style="text-align: center">
                                                第<asp:Label ID="lblPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />
                                                页 共<asp:Label ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>' />
                                                页
                                                <asp:LinkButton ID="btnFirst" runat="server" CausesValidation="False" Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>"
                                                    CommandArgument="First" CommandName="Page" Text="首页" />
                                                <asp:LinkButton ID="btnPrev" runat="server" CausesValidation="False" Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>"
                                                    CommandArgument="Prev" CommandName="Page" Text="上一页" />
                                                <asp:LinkButton ID="btnNext" runat="server" CausesValidation="False" Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
                                                    CommandArgument="Next" CommandName="Page" Text="下一页" />
                                                <asp:LinkButton ID="btnLast" runat="server" CausesValidation="False" Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
                                                    CommandArgument="Last" CommandName="Page" Text="尾页" />
                                                <%--                            第<asp:textbox id="txtNewPageIndex" runat="server" width="20px" text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />页
                            <asp:linkbutton  id="btnGo" runat="server" causesvalidation="False" commandargument="-1" commandname="Page" text="GO" OnClick="btnGo_Click" /><!-- here set the CommandArgument of the Go Button to '-1' as the flag -->
                                                --%>
                                            </td>
                                        </tr>
                                    </table>
                                </PagerTemplate>
                                <PagerStyle BorderColor="#CC0099" ForeColor="#FF3300" HorizontalAlign="Left" />
                                <EmptyDataTemplate>
                                    <div class="style61">
                                        <br />
                                        <br />
                                        <br />
                                        <span class="style60">暂无数据 ！<br />
                                        </span>
                                        <br />
                                        <br />
                                    </div>
                                </EmptyDataTemplate>
                                <SelectedRowStyle BackColor="#E0E0E0" />
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <asp:ObjectDataSource ID="ObjectDataSource_News_Manage" runat="server" DeleteMethod="Delete"
                        InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="Get_Data_By_SubclassId_For_Admin"
                        TypeName="DataSet_fp_news_DyhTableAdapters.Dyh_NewsTableAdapter" UpdateMethod="Update">
                        <DeleteParameters>
                            <asp:Parameter Name="Original_id" Type="Int32" />
                        </DeleteParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="topicid" Type="Int32" />
                            <asp:Parameter Name="headtitle" Type="String" />
                            <asp:Parameter Name="pretitle" Type="String" />
                            <asp:Parameter Name="title" Type="String" />
                            <asp:Parameter Name="titlecolor" Type="String" />
                            <asp:Parameter Name="titlefont" Type="String" />
                            <asp:Parameter Name="subtitle" Type="String" />
                            <asp:Parameter Name="newscontent" Type="String" />
                            <asp:Parameter Name="keyword" Type="String" />
                            <asp:Parameter Name="pagetype" Type="String" />
                            <asp:Parameter Name="autopagewordnumber" Type="Int32" />
                            <asp:Parameter Name="photos" Type="String" />
                            <asp:Parameter Name="Priority" Type="Int32" />
                            <asp:Parameter Name="newsfrom" Type="String" />
                            <asp:Parameter Name="sort" Type="Int32" />
                            <asp:Parameter Name="userid" Type="Int32" />
                            <asp:Parameter Name="username" Type="String" />
                            <asp:Parameter Name="time" Type="DateTime" />
                            <asp:Parameter Name="subclassid" Type="Int32" />
                            <asp:Parameter Name="subclassname" Type="String" />
                            <asp:Parameter Name="mainclassid" Type="Int32" />
                            <asp:Parameter Name="mainclassname" Type="String" />
                            <asp:Parameter Name="hits" Type="Int32" />
                            <asp:Parameter Name="zhaiyao" Type="String" />
                            <asp:Parameter Name="xiangguan" Type="String" />
                            <asp:Parameter Name="url" Type="String" />
                            <asp:Parameter Name="top" Type="Int32" />
                            <asp:Parameter Name="Score" Type="String" />
                            <asp:Parameter Name="Recommended" Type="Int32" />
                            <asp:Parameter Name="readstate" Type="Int32" />
                            <asp:Parameter Name="Delete_flag" Type="Boolean" />
                            <asp:Parameter Name="Original_id" Type="Int32" />
                        </UpdateParameters>
                        <SelectParameters>
                            <asp:ControlParameter ControlID="DropDownList2" Name="subclassid" PropertyName="SelectedValue"
                                Type="Int32" />
                        </SelectParameters>
                        <InsertParameters>
                            <asp:Parameter Name="topicid" Type="Int32" />
                            <asp:Parameter Name="headtitle" Type="String" />
                            <asp:Parameter Name="pretitle" Type="String" />
                            <asp:Parameter Name="title" Type="String" />
                            <asp:Parameter Name="titlecolor" Type="String" />
                            <asp:Parameter Name="titlefont" Type="String" />
                            <asp:Parameter Name="subtitle" Type="String" />
                            <asp:Parameter Name="newscontent" Type="String" />
                            <asp:Parameter Name="keyword" Type="String" />
                            <asp:Parameter Name="pagetype" Type="String" />
                            <asp:Parameter Name="autopagewordnumber" Type="Int32" />
                            <asp:Parameter Name="photos" Type="String" />
                            <asp:Parameter Name="Priority" Type="Int32" />
                            <asp:Parameter Name="newsfrom" Type="String" />
                            <asp:Parameter Name="sort" Type="Int32" />
                            <asp:Parameter Name="userid" Type="Int32" />
                            <asp:Parameter Name="username" Type="String" />
                            <asp:Parameter Name="time" Type="DateTime" />
                            <asp:Parameter Name="subclassid" Type="Int32" />
                            <asp:Parameter Name="subclassname" Type="String" />
                            <asp:Parameter Name="mainclassid" Type="Int32" />
                            <asp:Parameter Name="mainclassname" Type="String" />
                            <asp:Parameter Name="hits" Type="Int32" />
                            <asp:Parameter Name="zhaiyao" Type="String" />
                            <asp:Parameter Name="xiangguan" Type="String" />
                            <asp:Parameter Name="url" Type="String" />
                            <asp:Parameter Name="top" Type="Int32" />
                            <asp:Parameter Name="Score" Type="String" />
                            <asp:Parameter Name="Recommended" Type="Int32" />
                            <asp:Parameter Name="readstate" Type="Int32" />
                            <asp:Parameter Name="Delete_flag" Type="Boolean" />
                        </InsertParameters>
                    </asp:ObjectDataSource>
                    <asp:HiddenField ID="HiddenField_userid" runat="server" />
                    <asp:HiddenField ID="HiddenField_adminid" runat="server" />
                </td>
            </tr>
            <tr>
                <td style="width: 100%">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td style="width: 100%">
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
